{include file="public/header" /}
<title>管理员管理</title>
</head>

<body>
	<article class="page-container">
		<form class="form form-horizontal" id="form-admin-add" method="post" action="{:url('add')}">
			<div class="row cl">
				<label class="form-label col-xs-4 col-sm-3"><span class="c-red">*</span>oem_id：</label>
				<div class="formControls col-xs-8 col-sm-9">
					<input type="text" class="input-text" value="" id="oem_id" name="oem_id" placeholder="所属oem_id">
				</div>
			</div>
			<div class="row cl">
				<label class="form-label col-xs-4 col-sm-3"><span class="c-red">*</span>应用场景：</label>
				<div class="formControls col-xs-8 col-sm-9">
					<input type="text" class="input-text" value="" id="title" name="title" placeholder="应用场景">
				</div>
			</div>
			<div class="row cl">
				<label class="form-label col-xs-4 col-sm-3"><span class="c-red">*</span>短信分类：</label>
				<div class="formControls col-xs-8 col-sm-9">
					<select name="type" class="form-control">
						<option value="1">验证码</option>
						<option value="2">短信通知</option>
						<option value="3">推广短信</option>
						<option value="4">语音通知</option>
						<option value="5">群发助手</option>
					</select>
				</div>
			</div>
			<div class="row cl">
				<label class="form-label col-xs-4 col-sm-3"><span class="c-red">*</span>短信签名：</label>
				<div class="formControls col-xs-8 col-sm-9">
					<input type="text" class="input-text" value="" id="sign_name" name="sign_name" placeholder="短信签名">
				</div>
			</div>
			<div class="row cl">
				<label class="form-label col-xs-4 col-sm-3"><span class="c-red">*</span>模板ID：</label>
				<div class="formControls col-xs-8 col-sm-9">
					<input type="text" class="input-text" value="" id="tid" name="tid" placeholder="模板ID">
				</div>
			</div>
			<div class="row cl">
				<label class="form-label col-xs-4 col-sm-3"><span class="c-red">*</span>模板参数：</label>
				<div class="formControls col-xs-8 col-sm-9">
					<input type="text" class="input-text" value="" id="params" name="params" placeholder="模板参数">
				</div>
			</div>

			<div class="row cl">
				<div class="col-xs-8 col-sm-9 col-xs-offset-4 col-sm-offset-3">
					<input class="btn btn-primary radius" id='tijiao' type="button" value="&nbsp;&nbsp;提交&nbsp;&nbsp;">
				</div>
			</div>
		</form>
	</article>

	<!--_footer 作为公共模版分离出去-->
	<script type="text/javascript" src="__ADMIN__/lib/jquery/1.9.1/jquery.min.js"></script>
	<script type="text/javascript" src="__ADMIN__/lib/layer/2.4/layer.js"></script>
	<script type="text/javascript" src="__ADMIN__/static/h-ui/js/H-ui.min.js"></script>
	<script type="text/javascript" src="__ADMIN__/static/h-ui.admin/js/H-ui.admin.js"></script>
	<!--/_footer 作为公共模版分离出去-->

	<!--请在下方写此页面业务相关的脚本-->
	<script type="text/javascript" src="__ADMIN__/lib/jquery.validation/1.14.0/jquery.validate.js"></script>
	<script type="text/javascript" src="__ADMIN__/lib/jquery.validation/1.14.0/validate-methods.js"></script>
	<script type="text/javascript" src="__ADMIN__/lib/jquery.validation/1.14.0/messages_zh.js"></script>
	<script type="text/javascript">
		$(function() {
			$('.skin-minimal input').iCheck({
				checkboxClass: 'icheckbox-blue',
				radioClass: 'iradio-blue',
				increaseArea: '20%'
			});

			$('#tijiao').click(function() {
				$.ajax({
					type: 'post',
					data: {
						title: $('#title').val(),
						type: $('#type option:selected').val(),
						sign_name: $('#sign_name').val(),
						tid: $('#tid').val(),
						params: $('#params').val()
					},
					url: "{:url('add')}",
					success: function(data) {
						layer.msg('添加成功!', {
							icon: 1,
							time: 1000
						}, function() {
							window.parent.location.reload();
							var index = parent.layer.getFrameIndex(window.name);
							parent.layer.close(index);
						});

					},
					error: function(XmlHttpRequest, textStatus, errorThrown) {
						layer.msg('添加失败!', {
							icon: 1,
							time: 1000
						});
					}
				});
			});
		});
	</script>
	<!--/请在上方写此页面业务相关的脚本-->
</body>

</html>